﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace FLCP
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
            ddlType.SelectedIndex = 0;
        }

        private void btnExit_Click(object sender, EventArgs e)
        {
            Application.Exit();
        }

        private void btnGenerate_Click(object sender, EventArgs e)
        {
            var robot = new ShuangSeQiu();
            robot.Generate();

            var redBalls = robot.GeneratedRedBalls
                .OrderBy(i => i)
                .Select(i => i.ToString("00"));

            var s = string.Join(" ", redBalls.ToArray());

            var blueBalls = robot.GeneratedBlueBalls
                .OrderBy(i => i)
                .Select(i => i.ToString("00"));

            s += " - " + string.Join(" ", blueBalls.ToArray());

            tbResults.Text += s + Environment.NewLine;
        }
    }
}
